import java.util.ArrayList;
import java.util.List;

/**
 * @USER: Administrator
 * @DATE: 2024/9/27 下午9:53
 * @VERSION: 1.0.0
 */
public class LC1431 {
    public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) {
        List<Boolean> result = new ArrayList<>();
        int max=candies[0];
        for(int i = 1; i < candies.length; i++) {
            if (candies[i] > max) {
                max = candies[i];
            }
        }
        for (int candy : candies) {
            result.add(candy + extraCandies >= max);
        }
        return result;
    }
}
